package service

import (
	"gin-demo/dao"
	"gin-demo/model"
	"strconv"
)

type ShopService struct {
}

func (ss *ShopService) ShopList(long, lat string) []model.Shop {

	longitude, err := strconv.ParseFloat(long, 10)
	if err != nil {
		return nil
	}
	latitude, err := strconv.ParseFloat(lat, 10)
	if err != nil {
		return nil
	}
	sd := dao.NewShopDao()
	return sd.QueryShops(longitude, latitude)
}
